{% extends "timeline.html" %}

{% block title %}The Living History: {{timeline.name}} history{% endblock %}

	{% block navbar %}
			<li><a href="/">Home</a></li>
			<li><a href="/timeline/{{timeline.name}}">Back to Timeline</a></li>
			<li><a href="/timeline/{{timeline.name}}/history">Back to {{timeline.name}} history</a></li>
	{% endblock %}
	
	{% block h1 %}{{timeline.name}} {% endblock %}
	
	{% block display %}
	<table border=1>
	<tr><th>Rev [{{oldrev.rev_timestamp|date:"Y-m-d H:i:s"}}]</th><th>Rev [{{newrev.rev_timestamp|date:"Y-m-d H:i:s"}}]</th></tr>
	  {% if changedDescription %}
	  	<tr>
		  <td>
			<table border=0>
			  <tr>
			    <td>Description:</td>
				<td>{{oldrev.description}}</td>
			  </tr>
			</table>
		  </td>
		  <td>
			<table border=0>
			  <tr>
			    <td>Description:</td>
				<td>{{newrev.description}}</td>
			  </tr>
			</table>
		  </td>
		</tr>
	  {% endif %}
	  {% for ev in new_evs %}
	    <tr>
		  <td></td>
		  <td>
		  	<table border=0>
			  <tr>
			    <td>Name:</td>
				<td>{{ev.title}}</td>
			  </tr>
			  <tr>
			    <td>Start:</td>
				<td>{{ev.start}}</td>
			  </tr>
			  <tr>
			    <td>Latest Start:</td>
				<td>{{ev.latestStart}}</td>
			  </tr>
			  <tr>
			    <td>End:</td>
				<td>{{ev.end}}</td>
			  </tr>
			  <tr>
			    <td>Earliest End:</td>
				<td>{{ev.earliestEnd}}</td>
			  </tr>
			  <tr>
			    <td>Description:</td>
				<td>{{ev.description}}</td>
			  </tr>
			</table>
		  </td>
	    </tr>
	  {% endfor %}
	  {% for evs in changed_evs %}
	  	<tr>
		  {% for ev in evs %}
		  <td>
		    <table border=0>
			  <tr>
			    <td>Name:</td>
				<td>{{ev.title}}</td>
			  </tr>
			  <tr>
			    <td>Start:</td>
				<td>{{ev.start}}</td>
			  </tr>
			  <tr>
			    <td>Latest Start:</td>
				<td>{{ev.latestStart}}</td>
			  </tr>
			  <tr>
			    <td>End:</td>
				<td>{{ev.end}}</td>
			  </tr>
			  <tr>
			    <td>Earliest End:</td>
				<td>{{ev.earliestEnd}}</td>
			  </tr>
			  <tr>
			    <td>Description:</td>
				<td>{{ev.description}}</td>
			  </tr>
			</table>
		  </td>
		  {% endfor %}
	    </tr>
		{% endfor %}
		{% for ev in deleted_evs %}
	    <tr>
		  <td>
		  	<table border=0>
			  <tr>
			    <td>Name:</td>
				<td>{{ev.title}}</td>
			  </tr>
			  <tr>
			    <td>Start:</td>
				<td>{{ev.start}}</td>
			  </tr>
			  <tr>
			    <td>Latest Start:</td>
				<td>{{ev.latestStart}}</td>
			  </tr>
			  <tr>
			    <td>End:</td>
				<td>{{ev.end}}</td>
			  </tr>
			  <tr>
			    <td>Earliest End:</td>
				<td>{{ev.earliestEnd}}</td>
			  </tr>
			  <tr>
			    <td>Description:</td>
				<td>{{ev.description}}</td>
			  </tr>
			</table>
		  </td>
		  <td></td>
	    </tr>
	  {% endfor %}
	</table>
	
	{% endblock display %}
